<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>airline_list</title>
	<!-- 为IE9之前的版本创造HTML5的元素 -->
	<!--[if lt IE 9]>
		<script>
			var e = ("abbr,article,aside,audio,canvas,datalist,details,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video").split(',');
			for(var i = 1; i < e.length; i++)
				document.createElement(e[i]);
		</script>
	<![endif]-->
	<style type="text/css">
		body{margin:0}
		#a_l_table{
			width:100%;
			text-align:center;
			margin:2px;
			width:974px;
			border:1px solid #FFD99C;
			border-collapse:collapse;
		}
		#a_l_table td{
			border:1px solid #FFD99C;
			text-align:center;
		}
		#pageUpDown{
			margin-top:10px;
			width:100%;
			text-align:center;
		}
		#pageUpDown span{
			margin:0 10px;
			cursor:pointer;
		}
		table a{
			text-decoration:none;
			color:#666;
		}
		table a:hover{
			text-decoration:underline;
			color:#FF9000;
		}
		.sort a{
			color:#000;
			text-decoration:underline;
		}
	</style>
</head>
<body onload="setheightAndCheck()">
	<table id="a_l_table">
		<tr style="font-weight:600;">
			<td>航空公司名称</td>
			<td>类型</td>
			<td>详细描述</td>
			<td>公司链接</td>
			<td class="sort"><a href="__URL__/sort_by_shipment">货运量</a></td>
			<td class="sort"><a href="__URL__/sort_by_service_quality">服务质量</a></td>
			<td>联系方式</td>
			<td>备注</td>
		</tr>
		<volist name="list" id="vo">
		<tr style="color:#666;">
			<td style="width:150px;"><a href="__URL__/view?id={$vo.id}" target="_blank" name="con_1" title="{$vo.airline_name}">{$vo.airline_name}</a></td>
			<td style="width:50px;">{$vo.airline_type}</td>
			<td style="width:280px;" name="con">{$vo.detail_info}</td>
			<td style="width:180px;"><a href="http://{$vo.airline_link}" target="_blank" name="con_2" title="{$vo.airline_link}">{$vo.airline_link}</a></td>
			<td style="width:50px;">{$vo.shipment}</td>
			<td style="width:70px;">{$vo.service_quality}</td>
			<td style="width:100px;">{$vo.contact_information}</td>
			<td style="width:20px;">{$vo.comments}</td>
		</tr>
		</volist>
	</table>
	<div id="pageUpDown">
		<span>{$show}</span>
	</div>
	<script>
	function setheightAndCheck(){
		//当文字超过num个时，后面的变成...
		var con = document.getElementsByName("con");
		var n = con.length;
		for(var i=0;i < n; i++){
			var o = con[i].innerHTML;
			if(o.length > 100){
				o = o.substr(0,100);
				o += "...";
			}
			con[i].innerHTML = o;
		}
		var con_1 = document.getElementsByName("con_1");
		var n = con_1.length;
		for(var i=0;i < n; i++){
			var o = con_1[i].innerHTML;
			if(o.length > 7){
				o = o.substr(0,7);
				o += "...";
			}
			con_1[i].innerHTML = o;
		}
		var con_2 = document.getElementsByName("con_2");
		var n = con_2.length;
		for(var i=0;i < n; i++){
			var o = con_2[i].innerHTML;
			if(o.length > 20){
				o = o.substr(0,20);
				o += "...";
			}
			con_2[i].innerHTML = o;
		}
		var newHeight = document.body.scrollHeight;
		window.parent.document.getElementById("airline_list").height = newHeight;
		window.parent.document.getElementById("ad_recommend").height = newHeight;
		//以上firefox通过，但是ie6必须加上下面这句，不然iframe高度是改了，但是可见区域没有改
		window.parent.document.getElementById("ad_recommend").height = newHeight;
	}
	</script>
</body>
</html>
